import json

# 把json字符串转为Python数据
# 1.准备json字符串
json_str = '''[
  {
    "a": "thia is a",
    "b": [1, 2, 3]
  },
  {
    "c": "thia is c",
    "d": [1, 2, 3]
  }
]'''
# 2.转换python数据
rs = json.loads(json_str)
print(rs)
print(type(rs))
print(type(rs[0]))

# 把json文件转为Python数据
# 1.构建指向json文件的问件对象
with open(r'G:\downloads\acg\漫画残影\动漫之家订阅信息.json',encoding='utf-8') as fp:
    # 2.加载文件对象转换python数据
    python_list = json.load(fp)
    print(python_list)
    print(type(python_list))
    print(type(python_list[0]))